package com.xu.myTest;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.xu.model.Student;
import com.xu.model.Teacher;

import java.util.List;
import java.util.Map;

/**
 * 对象转json字符
 */
public class Map2Json {

    public static void main(String[] args) {
        Map<String, Student> maps = Maps.newHashMap();
        maps.put("蓝胖子", new Student("003", "哆啦A梦"));
        System.out.println(JSON.toJSONString(maps));
    }


}
